<?php
// +---------------------------------------------------------------------+
// | OneBase    | [ WE CAN DO IT JUST THINK ]                            |
// +---------------------------------------------------------------------+
// | Licensed   | http://www.apache.org/licenses/LICENSE-2.0 )           |
// +---------------------------------------------------------------------+
// | Author     | Bigotry <3162875@qq.com>                               |
// +---------------------------------------------------------------------+
// | Repository | https://gitee.com/Bigotry/OneBase                      |
// +---------------------------------------------------------------------+

namespace app\api\validate;

/**
 *简历验证器
 */
class Resume extends ApiBase
{
    
    // 验证规则
    protected $rule = [
        'user_id'  => 'require|unique:resume',
        'name'  => 'require',
		'phone'  => 'require',
		'position_id'  => 'require',
    ];

    // 验证提示
    protected $message = [
        'user_id.require'    => '请提交用户信息',
		'user_id.unique'       => '你已添加简历',
        'name.require'    => '姓名不能为空',
		'phone.require'    => '手机号不能为空',
		'position_id.require'    => '请选择求职类型',
    ];

    // 应用场景
    protected $scene = [       
        'resume'  =>  ['user_id','name','phone'],
		'resumeqz'  =>  ['position_id'],
    ];
}
